<?php

include_once("connexion.php");

$_SESSION['url'] = 'profil.php?id='.$_SESSION["userId"];

if (!isset($_SESSION["userId"])){
	header("location:authentification.php");
}

	
	
$query = "SELECT user.login, user.nom, user.prenom, user.telephone, user.mail, user.naissance, user.sexe, user.bailleur
		  FROM user
		  WHERE id= '".$_SESSION["userId"]."'";
		  
$resultat = mysqli_query($connexion, $query);		  


if(isset($_POST['deco'])){
	$_SESSION = array();
	session_destroy();
	header("location:accueil.php");
}

include_once("banniere.html");
include_once("profil.html");
include_once("footer.html");

?>